/**
 * 
 */
package org.extdev.device;

import org.extdev.connection.Connection;
import org.extdev.protocol.Protocol;


/**
 * @author LAP
 *
 */
public abstract class Device {
	
	private Connection connection;
	
	private Protocol<?, ?> protocol;
	
	public Connection getConnection() {
		return connection;
	}
	public void setConnection(Connection connection) {
		if (connection == null) throw new NullPointerException("Connection must be not null");
		this.connection = connection;
	}
	public Protocol<?, ?> getProtocol() {
		return protocol;
	}
	public void setProtocol(Protocol<?, ?> protocol) {
		if (connection == null) throw new NullPointerException("Protocol must be not null");
		this.protocol = protocol;
	}
}
